Slides

https://jeremy-allen.github.io/rstudio-tips/

library(palmerpenguins)
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✓ ggplot2 3.3.5     ✓ purrr   0.3.4
## ✓ tibble  3.1.5     ✓ dplyr   1.0.7
## ✓ tidyr   1.1.4     ✓ stringr 1.4.0
## ✓ readr   2.0.2     ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(janitor)
## 
## Attaching package: 'janitor'
## The following objects are masked from 'package:stats':
## 
##     chisq.test, fisher.test
library(here)
## here() starts at /cloud/project

Adjusting Global Options in the RStudio IDE

Pro tip: cmd+, to access global options

rearrange panels

change theme

Show chunk output in console

default R version &

don’t save workspace data

set repo for RStudio Public Package Manager

Pro tip: If you are on a Linux server, see what operating system you are on by running this in your console:
system("lsb_release -a")
Then go to RStudio Public Package Manager

allow scroll past end of doc & rainbow parentheses

shift+cmd+p then do anything

Use shift+cmd+p to access the command palette and:

  • Toggle Memory Usage Display in Environment Pane
  • Syntax highlighting in console output
  • Knit Current Document
  • Highlight Selected Line

adjust the code chunk options at the top of this file to hide code and re-knit

Expand the outliner

Pro tip: Navigate your document with the outliner



Outline is also down here


Code folding

Go back up to the line “## set repo for RStudio Public Package Manager”
Click the little triangle next to the line number


git in the IDE

Pro tip: cmd+a to select all

In the git tab, click once on the row of the top item.
Then, cmd+a to select them all. Then, check one box to check them all.


Pro tip: revert


Add a bunch text below and save the file